package com.forekonw.demo5;

public class Test1 {

    public Animal a(){
        Animal ani1 = new Animal();
        ani1.age = 2;
        ani1.name= "xiaohou";
        ani1.type ="monkey";
        ani1.zool = "shenyang";
        return ani1;
    }

    public void b(Animal a){
        System.out.println(a.name+"---"+a.type+"---"+a.zool);
    }

    public static void main(String[] args) {
        Test1 c = new Test1();
        Animal anv = new Animal();
        anv.name = "tom";
        anv.type = "monkey";
        anv.zool = "shenyang";
        c.a();


        Animal ani = new Animal();
        ani.name = "tom";
        ani.type = "monkey";
        ani.zool = "shenyang";

         c.b(ani);



    }


}
